//
//  ZCProjectdetailsBtnView.m
//  zctx
//
//  Created by apple on 15/12/1.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import "ZCProjectdetailsBtnView.h"

@implementation ZCProjectdetailsBtnView

-(instancetype)init{
    self = [super init];
    if (self) {
        
        self.imageView = [[UIImageView alloc]init];
        [self addSubview:self.imageView];
        [self.imageView makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.right).with.offset(0);
            make.centerY.equalTo(self.centerY).with.offset(0);
            make.width.mas_equalTo(@(7));
            make.height.mas_equalTo(@(14));
        }];
        self.imageView.image = [UIImage imageNamed:@"details_right"];

        self.titleLable= [[UILabel alloc] init];
        self.titleLable.textAlignment = NSTextAlignmentCenter;
        self.titleLable.font = [UIFont systemFontOfSize:15];
        [self addSubview:self.titleLable];
        [self.titleLable makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(self.imageView.left).with.offset(0);
            make.centerY.equalTo(self.centerY).with.offset(0);
            make.left.equalTo(self.left).with.offset(0);
            make.height.mas_equalTo(@(21));
        }];
    }
    return self;
}
-(void)setTitleColor:(UIColor *)titleColor{
    _titleColor = titleColor;
    self.titleLable.textColor = titleColor;
}

-(void)setImageStr:(NSString *)imageStr{
    _imageStr = imageStr;
    _imageView.image =[UIImage imageNamed:imageStr];
}

-(void)setTitleStr:(NSString *)titleStr{
    _titleStr = titleStr;
    _titleLable.text =[NSString stringWithFormat:@"%@",titleStr];
}

-(void)setFont:(UIFont *)font{
    _font = font;
    _titleLable.font = font;
}

@end
